<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Jquery</title>
    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript">
		$(document).ready(function(){
			var text_max = 55;
			$('#textarea_feedback').html(text_max + ' character remaining');
			$('#textarea').keyup(function(){
				var text_length = $('#textarea').val().length;
				var text_remaining = text_max - text_length;
				$('#textarea_feedback').html(text_remaining + ' character remaining');
			});
		});
    </script>
</head>
<body>
	<textarea id="textarea" rows="7" cols="25" maxlength="55"></textarea>
    <div id="textarea_feedback"></div>
</body>
</html>
